package br.poli.ecomp.sma.massim.agent;

import jason.asSemantics.DefaultInternalAction;
import jason.asSemantics.TransitionSystem;
import jason.asSemantics.Unifier;
import jason.asSyntax.NumberTermImpl;
import jason.asSyntax.Term;
import br.poli.ecomp.sma.massim.action.Direction;

@SuppressWarnings("serial")
public class FindDirection extends DefaultInternalAction {
	@Override
	public Object execute(TransitionSystem ts, Unifier un, Term[] args) throws Exception {
		Term x = args[0];
		Term y = args[1];
		Term newX = args[2];
		Term newY = args[3];
		Term direction = args[4];
		 
		un.unifies(direction, new NumberTermImpl(Direction.NORTH.getValue()));
		
		return true;
	}
}
